<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="./css/api.css" rel="stylesheet"/>
    <link href="./css/element.css" rel="stylesheet"/>
    <link href="./css/base.css" rel="stylesheet"/>
    <style>
    .x-assa-form{
      margin: 1rem;
    }.el-form-item__label{
      display: block;
      float: none;
      text-align: left;
      border-left: 2px solid #f00;
      padding-left: 1rem;
      height: auto;
      line-height: inherit;
    }.el-form-item__content{
      margin-left: 1.2rem;
      margin-top: 1rem;
    }.el-radio__input{
      display: none;
    }.el-radio{
      background-color: #fff;
      box-shadow:0px 0px 5px 0px rgba(0,0,0,0.15);
      text-align: center;
      border-radius: .2rem;
      width: 5rem;
      height: 2rem;
      line-height: 2rem;
      padding: 0;
      display: inline-block;
    }.el-radio.is-checked{
      background-color: #FF3C3C;
    }.el-radio__input.is-checked+.el-radio__label{
      color: #fff;
    }.el-radio__label{
      padding: 0;
    }.el-textarea__inner{
      height: 6rem;
    }.x-mana-btn{
      background-color: #FF3C3C;
      margin: 1rem;
      height: 3rem;
      line-height: 3rem;
      text-align: center;
      color: #fff;
      border-radius: .4rem;
      box-shadow:0rem 0rem 0.63rem 0rem rgba(0,0,0,0.15);
      clear: both;
    }.el-form--label-top .el-form-item__label{
      padding-left: 1rem;
      padding-bottom: 0;
    }.x-item-float{
      float: left;
      width: 50%;
    }.x-item-float .el-input{
      width: 100%;
    }.el-form--inline .el-form-item{
      width: 90%;
    }.el-form--inline .el-form-item.x-item-float{
      margin-right: 0;
      width: 50%;
    }input,textarea{
      background-color: #ECECEC!important;
      border: none!important;
    }
    </style>
</head>
<body style="margin:0">
    <div id="vm" class="x-examok" v-cloak>
      <header class="x-header">
        <i class="el-icon-arrow-left x-closewin-icon" @click="closethiswin"></i>
        <div class="x-header-t">查看</div>
      </header>
      <!--  -->
      <div class="x-assa-form">
        <el-form ref="form" :model="form" :label-position="topposition" :inline="true">
          <el-form-item label="姓名" class="x-item-float">
            <el-input v-model="form.name" :disabled="isdisabled"></el-input>
          </el-form-item>

          <el-form-item label="年龄" class="x-item-float">
            <el-input v-model="form.age" :disabled="isdisabled"></el-input>
          </el-form-item>

          <el-form-item label="性别" class="x-item-float">
            <el-select v-model="form.gender" placeholder="性别" :disabled="isdisabled">
              <el-option label="男" value="1"></el-option>
              <el-option label="女" value="2"></el-option>
            </el-select>
          </el-form-item>

          <!-- <el-form-item label="出生日期">
            <el-date-picker v-model="form.time" type="date" placeholder="选择日期"></el-date-picker>
          </el-form-item> -->

          <el-form-item label="联系方式" class="x-item-float">
            <el-input v-model="form.tel" :disabled="isdisabled"></el-input>
          </el-form-item>

          <el-form-item label="户口所在地">
            <el-input v-model="form.address" :disabled="isdisabled"></el-input>
          </el-form-item>

          <el-form-item label="意向岗位">
            <el-input v-model="form.post" :disabled="isdisabled"></el-input>
          </el-form-item>

          <el-form-item label="意向区域">
            <el-input v-model="form.area" :disabled="isdisabled"></el-input>
          </el-form-item>

          <el-form-item label="薪资期望">
            <el-col :span="11">
              <el-input v-model="form.money1" :disabled="isdisabled"></el-input>
            </el-col>
            <el-col class="line" :span="2" style="text-align:center">-</el-col>
            <el-col :span="11">
              <el-input v-model="form.money2" :disabled="isdisabled"></el-input>
            </el-col>
          </el-form-item>

          <el-form-item label="自我评价">
            <el-input type="textarea" v-model="form.my" :disabled="isdisabled"></el-input>
          </el-form-item>
          <div class="x-mana-btn" @click="closethiswin">返回</div>
        </el-form>
      </div>

    </div>

  <script type="text/javascript" src="./script/vue.js"></script>
  <script type="text/javascript" src="./script/element.js"></script>
  <script type="text/javascript" src="./script/api.js"></script>
  <script type="text/javascript" src="./js/base.js"></script>
	<script>
  apiready = function () {
    var assessment = api.pageParam.id;
    console.log(assessment);

    var vm = new Vue({
      el:'#vm',
      data(){
        return{
          form:{
            name:'',
            age:'',
            gender:'',
            time:'',
            address:'',
            post:'',
            area:'',
            money1:'',
            money2:'',
            my:'',
            tel:''
          },
          topposition:'top',
          assessm:'',//id
          isdisabled:true
        }
      },
      created:function() {
        var that=this;


      },
      mounted:function(){
        var that=this;
        that.assessm = assessment;
        console.log(that.assessm);
        that.gosubmit()

      },
      methods: {
        gosubmit:function(){
          var that=this;
          api.ajax({
            url:manaurltwo+'detail',
            methods:'get',
            data:{
              values:{
                id:that.assessm,
                sec: $api.getStorage('usertoken')
              }
            }
          },function(ret,err){
            if(ret){
              api.hideProgress();
              console.log(JSON.stringify(ret));
              if(ret.status == 1){
                that.form.name = ret.data.username;
                that.form.age = ret.data.age;
                that.form.gender = ret.data.gender;
                that.form.tel = ret.data.tel;
                that.form.address = ret.data.home_addr;
                that.form.post = ret.data.work_title;
                that.form.area = ret.data.area_title;
                that.form.money1 = ret.data.wages_min;
                that.form.money2 = ret.data.wages_max;
                that.form.my = ret.data.evaluate;

              }else{
                api.toast({
                    msg: ret.msg,
                    duration: 3000,
                    location: 'bottom'
                });
              }
            }else{
              api.hideProgress();
              console.log(JSON.stringify(err));
              api.toast({
                  msg: err.msg,
                  duration: 3000,
                  location: 'bottom'
              });
            }
          })
        },
      }
    })
  }

	</script>
</body>
</html>
